import { baseUrl, doRequestPost, doRequestDel, doRequestPut, doRequestGet } from '@/utils/request'

export const wordFileUploadUrl = baseUrl + 'file/upload'

export function getClassifylist(query) {
  return doRequestPost(baseUrl + 'cms/classify/list' + '?time=' + (+new Date()), query)
}
export function getTagslist(query) {
  return doRequestPost(baseUrl + 'cms/tags/list' + '?time=' + (+new Date()), query)
}
export function getTagsdetail(query) {
  return doRequestPost(baseUrl + 'cms/tags/detail/tagNewsList' + '?time=' + (+new Date()), query)
}
export function getTagNewsGraph(query) {
  return doRequestPost(baseUrl + 'cms/tags/detail/tagNewsGraph' + '?time=' + (+new Date()), query)
}
export function TagsupdateState(query) {
  return doRequestPost(baseUrl + 'cms/tags/updateState' + '?time=' + (+new Date()), query)
}
export function addTags(type, query) {
  return doRequestPost(baseUrl + 'cms/tags/' + type + '/add?time=' + (+new Date()), query)
}
export function updateTags(type, query) {
  return doRequestPost(baseUrl + 'cms/tags/' + type + '/update?time=' + (+new Date()), query)
}
export function delTags(query) {
  return doRequestPost(baseUrl + 'cms/tags/del' + '?time=' + (+new Date()), query)
}

export function findstock(query) {
  return doRequestPost(baseUrl + 'cms/tags/stock/find' + '?time=' + (+new Date()), query)
}
export function findfund(query) {
  return doRequestPost(baseUrl + 'cms/tags/fund/find' + '?time=' + (+new Date()), query)
}
export function addClassify(query) {
  return doRequestPost(baseUrl + 'cms/classify/add' + '?time=' + (+new Date()), query)
}
export function updateClassify(query) {
  return doRequestPost(baseUrl + 'cms/classify/update' + '?time=' + (+new Date()), query)
}
export function delClassify(query) {
  return doRequestPost(baseUrl + 'cms/classify/del' + '?time=' + (+new Date()), query)
}
export function filedownload(query) {
  return doRequestPost(baseUrl + 'file/download' + '?time=' + (+new Date()), query)
}
export function fileparse(query) {
  return doRequestPost(baseUrl + 'file/parse' + '?time=' + (+new Date()), query)
}

// 获取列表数据
export function getLabelList(query) {
  return doRequestPost(baseUrl + 'cms/tags/detail/tagNewsList' + '?time=' + (+new Date()), query)
}
// 获取tab的 数据
export function getTabCountList(query) {
  return doRequestPost(baseUrl + 'cms/tags/detail/tagNewsCount' + '?time=' + (+new Date()), query)
}

// 获取一、二级基金行业的数据
export function levtree(query) {
  return doRequestGet(baseUrl + 'cms/tags/industry/tree?time=' + (+new Date()), query)
}

// 获取主题的树结构
export function themeTree(query) {
  return doRequestGet(baseUrl + 'cms/tags/theme/list?time=' + (+new Date()), query)
}

